<?php 
//to render shopping cart total and article count in each page
require("storescripts/cart_script.php");
//excute customer_login_script
require("storescripts/customer_login_script.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Log In</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />

<!-- start of javascript -->
<script type="text/javascript" language="javascript"> 
// validating forms before processing to a PHP script
function validateMyForm ( ) { 
    var isValid = true;
    
	if ( document.form1.username.value == "" || document.form1.password.value == "" ) { 
	    alert ( "Please enter required fields" ); 
	    isValid = false;
	} 
    return isValid;
}
</script>
<!--end of script -->

</head>
<body>
<!-- Shell -->
<div class="shell">
  <!-- Header -->
  <div id="header">
    <h1 id="logo"><a href="index.php">Luvo Fashion</a></h1>
    <!-- Cart -->
    <div id="cart"> <a href="cart.php" class="cart-link">Your Shopping Cart</a>
      <div class="cl">&nbsp;</div>
      <span>Articles: <strong><?php echo $cartArticles;?></strong></span> &nbsp;<span><strong><?php echo $cartTotal;?></strong></span> 
	</div>
    <!-- End Cart -->
    <!-- Navigation -->
    <div id="navigation">
      <ul>
        <li><a href="index.php">Home</a></li>
        <li><a href="about_us.php">About Us</a></li>
        <li><a href="faq.php">FAQ</a></li>
		<li><a href="gallery.php">Gallery</a></li>
        <li><a href="contact.php">Contact</a></li>
		<li><a href="customer_login.php" class="active">My Account</a></li>
      </ul>
    </div>
    <!-- End Navigation -->
  </div>
  <!-- End Header -->
  <!-- Main -->
  <div id="main">
    <div class="cl">&nbsp;</div>
    <!-- Content -->
    <div id="content">
      	<div align="center" style="margin-left:20px; padding-top:40px; height:400px;">
		    <h2>Please log in</h2>
	        <br />
	        <br />
	        <form id="form1" name="form1" method="post" action="storescripts/customer_login_script.php">
	        Username: <input name="username" type="text" id="username" size="40" />
	        <br /> <br />
	        Password: <input name="password" type="password" id="password" size="40" />
	        <br /> <br />
	        	<input type="submit" name="button" id="button" value="Log In" onClick="javascript:return validateMyForm();"/>
	        </form>  
		</div>
    </div>
    <!-- End Content -->
    <!-- Sidebar -->
    <div id="sidebar">
      <!-- Login/Register -->
<!-- if no user log on show below-->
      <div class="box login">
        <h2>User Account<span></span></h2>
        <div align="center"class="box-content">
          <form name="loginReg">
			<p>Not a member yet?</p>
            <label style="padding-top:1px; padding-bottom:1px;"><a style="color:#ccc; text-decoration:none;"href="register.php">Register</a></label>
          </form>
        </div>
      </div>

      <!-- End Login -->
      
    </div>
    <!-- End Sidebar -->
    <div class="cl">&nbsp;</div>
  </div>
  <!-- End Main -->
  
  <!-- Footer -->
  <?php include_once("template_footer.php"); ?>
  <!-- End Footer -->
</div>
<!-- End Shell -->
</body>
</html>


